Where Should Using Statements Be Located [closed]
Posted
by Bobby Ortiz - DotNetBob
on Stack Overflow
See other posts from Stack Overflow
or by Bobby Ortiz - DotNetBob
Published on 2009-07-01T12:50:17Z
Indexed on
2010/04/04
15:43 UTC
Read the original article
Hit count: 172
c#
|coding-style
Possible Duplicate:
What is the difference between these two declarations?
I recently started working on a project with using statement located inside the NameSpace block.
namespace MyApp.Web
{
using System;
using System.Web.Security;
using System.Web;
public class MyClass
{
I usually put my using statements above the namespace block.
using System;
using System.Web.Security;
using System.Web;
namespace MyApp.Web
{
public class MyClass
{
I don't think it matters, but I am currious if someone else had a recommendation and could they explain why one way is better than another.
Note: I always have one class per file.
© Stack Overflow or respective owner